package com.haide.channel.pro.callBack;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 回调统一入口
 * <p>
 * 1.
 * </p>
 *
 * @author : wukong
 * @version : 1.0.0
 * @date : 2018/7/19
 */
@Slf4j
@Controller
@RequestMapping("/haiDe/notice")
public class NoticeController {

    /**
     * 绑卡回调请求
     *
     * @return
     */
    @ResponseBody
    @RequestMapping("/auth-status")
    public String bindCard() {
        log.info("绑卡回调请求：四要素绑卡成功！");
        return "ok";
    }

    /**
     * 落地商户银联绑卡回调请求
     *
     * @return
     */
    @ResponseBody
    @RequestMapping("/union-callback")
    public String unionCallback() {
        log.info("落地商户银联绑卡回调请求");
        return "ok";
    }

    /**
     * 代还回调请求
     *
     * @param data
     * @param sign
     * @return
     */
    @ResponseBody
    @RequestMapping("/create-repay")
    public String createRepay(String data, String sign) {
        log.info("代还回调请求：data:{},sign:{}", data, sign);
        return "ok";
    }

    /**
     * 绑卡回调请求
     *
     * @param data
     * @param sign
     * @return
     */
    @ResponseBody
    @RequestMapping("/bind-card")
    public String bindCard(String data, String sign) {
        log.info("绑卡回调请求：data:{},sign:{}", data, sign);
        return "ok";
    }
}
